package com.wm.homework04;

public class BloodWarrior extends Warrior{
    public void win() {
        super.setExperience(super.getExperience() + 10);
        System.out.println("K.O,经验值增加10,总经验值为:" + super.getExperience());
    }

    public BloodWarrior() {
    }

    public BloodWarrior(int experience, int blood) {
        super(experience, blood);
    }

    @Override
    public int injure(int x) {
        int blood = this.getBlood() - x;
        if (blood < MAX/2){
            System.out.println("血液值不足,危险!");
        }
        return blood;
    }

}
